<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'users-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'username'); ?>
		<?php echo $form->textField($model,'username',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'username'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'domain'); ?>
		<?php echo $form->textField($model,'domain',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'domain'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'realname'); ?>
		<?php echo $form->textField($model,'realname',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'realname'); ?>
	</div>
<!--
	<div class="row">
		<?php echo $form->labelEx($model,'password'); ?>
		<?php echo $form->passwordField($model,'password',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'password'); ?>
	</div>
-->
	<div class="row">
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->textField($model,'email'); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>
<!--
	<div class="row">
		<?php echo $form->labelEx($model,'role'); ?>
		<?php echo $form->textField($model,'role'); ?>
		<?php echo $form->error($model,'role'); ?>
	</div>
-->
	<div class="row">
		<?php echo $form->labelEx($model,'role'); ?>
		<?php echo CHTML::activeDropDownList($model,'role', CHtml::listData(CActiveRecord::model('Role')->findAll(),'id','rolename')); ?>
		<?php echo $form->error($model,'role'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
        <?php echo CHTML::activeDropDownList($model, 'status', CHtml::listData(CActiveRecord::model('Status')->findAll(), 'id','statusname')); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>
<!--
	<div class="row">
		<?php echo $form->labelEx($model,'lastedit'); ?>
		<?php echo $form->textField($model,'lastedit'); ?>
		<?php echo $form->error($model,'lastedit'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'lastlogin'); ?>
		<?php echo $form->textField($model,'lastlogin'); ?>
		<?php echo $form->error($model,'lastlogin'); ?>
	</div>
-->
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
